home *** CD-ROM | disk | FTP | other *** search
- import java.util.Timer;
- import java.util.TimerTask;
-
- class FightTimer extends TimerTask {
- FightCanvas parent;
- Timer timer;
-
- FightTimer(FightCanvas var1) {
- this.parent = var1;
- this.timer = new Timer();
- this.timer.schedule(this, 0L, 125L);
- }
-
- public void run() {
- this.parent.run();
- }
-
- void stop() {
- if (this.timer != null) {
- ((TimerTask)this).cancel();
- this.timer.cancel();
- this.timer = null;
- }
- }
- }
-